import KafkaSink.Base
import org.apache.flink.api.common.functions.FlatMapFunction
import org.apache.flink.api.common.typeinfo.Types
import org.apache.flink.util.Collector

/**
 *
 * @author Spring_Hu
 * @date 2021/10/10 21:16
 */
object FlatMap extends Base {
  def main(args: Array[String]): Unit = {
    run{

      ds.flatMap(new FlatMapFunction[Int,Int] {
        override def flatMap(value: Int, out: Collector[Int]) = {
          out.collect(value*value*value)
        }
      }).returns(classOf[Int]).print()
    }
  }
}
